﻿function sendAJAX(url,async) {
    // Mozilla version
    if (window.XMLHttpRequest) {
        xhr = new XMLHttpRequest();
    }
    // IE version
    else if (window.ActiveXObject) {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }

    var day = new Date();
    var time = day.getTime();
    url = url + '&randomizer=' + time;

    if (async == false)
    { 
        xhr.open("GET", url, false);
    }
    else
    {
        xhr.open("GET", url);
    }
    xhr.setRequestHeader(
		'Content-Type',
		'application/x-www-form-urlencoded; charset=UTF-8');

    xhr.send("");
    return xhr;
}